<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title> 家計簿　</title>
    <script type="text/javascript" src="js/prototype-1.6.0.3.js"></script>
    <script type="text/javascript" src="js/date_span.js"></script>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/account.css" rel="stylesheet" type="text/css">
  </head>
<body>
  {% include "_menu.html" %}
  {% if err_msg %}
    <div style="color:red;">{{err_msg}}</div>
  {% endif %}
<form id="account" action="/export.csv" method="post">
  <div class="title">CSV形式で出力されます。</div>
  種別<select name="data_type">
    <option value="account">帳簿データ</option>
    <option value="memo">メモデータ</option>
  </select>
  <br/>
  期間<span id="date_span"></span>
  <input type="submit" style="margin-left:25px;margin-top:10px;" value="取得"/>
</form>
<script type="text/javascript">
document.observe('dom:loaded',function(){
  var today = new Date();
  var start_day = new Date(today.getFullYear(),today.getMonth(),1);
  var end_day = new Date(today.getFullYear(),today.getMonth(),today.getDate()+1);
  var date_obj = new DateSpan({id:"date_span",start:{year:-3},
                                default_start_day:start_day,default_end_day:today});
});
</script>
</body>
</html>
